package com.imist.nettybasic4.client.handler;

import com.imist.nettybasic4.protocol.response.GroupMessageResponsePacket;
import com.imist.nettybasic4.session.Session;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;


public class GroupMessageResponseHandler extends SimpleChannelInboundHandler<GroupMessageResponsePacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, GroupMessageResponsePacket groupMessageResponsePacket) throws Exception {
        String fromGroupIdId =groupMessageResponsePacket.getFromGroupId();
        Session userSession =groupMessageResponsePacket.getFromUser();

        System.out.println("收到群["+fromGroupIdId+"]中"+userSession+"发来的消息 : "+groupMessageResponsePacket.getMessage());
    }
}
